package com.async_export_demo.config;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

@ConfigurationProperties(prefix = "my-export")
@Configuration
@Data
public class MyExportConfig {

    private String rootPath;
    private String domain;

    /**
     * 超时时间
     */
    private long timeout;

    /**
     * 超时时间单位
     */
    private TimeUnit timeoutUnit;

    public static void main(String[] args) {
        TimeUnit timeoutUnit = TimeUnit.SECONDS;
        System.out.println(timeoutUnit.toMillis(2));
    }
}